<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 数据表格</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>学生成绩</h5>
                    </div>
                <div class="ibox-content">
                    <div style="float: left">
                        <a onclick="fnClickAddRow();" href="" class="btn btn-primary ">添加成绩</a>
                    </div>
                    <div style="margin-left: 84%">
                        <input  type="text" style="width: 200px;height: 30px;" id="selectStudent" placeholder="按学生名字查询，输入关键字即可">
                        <button class="btn btn-primary"  onclick="">查询</button>
                    </div>
                    <table class="table table-striped table-bordered table-hover " id="">
                        <thead>
                            <tr>
                                <th style="width: 12%">学生学号</th>
                                <th style="width: 12%">学生姓名</th>
                                <th style="width: 12%">班级</th>
                                <th style="width: 12%">课程</th>
                                <th style="width: 12%">授课教师</th>
                                <th style="width: 12%">平时成绩</th>
                                <th style="width: 12%">考试成绩</th>
                                <th style="width: 12%">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Gecko</td>
                                <td>Mozilla 1.7</td>
                                <td>Win 98+ / OSX.1+</td>
                                <td class="center">1.7</td>
                                <td>Win 98+ / OSX.1+</td>
                                <td>Win 98+ / OSX.1+</td>
                                <td class="center">1.7</td>
                                <td class="center">
                                    <button class="btn btn-primary"  onclick="">编辑成绩</button>
                                </td>
                            </tr>
                            <tr>
                                <td>Other browsers</td>
                                <td>All others</td>
                                <td>-</td>
                                <td class="center">-</td>
                                <td class="center">U</td>
                                <td>Win 98+ / OSX.1+</td>
                                <td class="center">1.7</td>
                                <td>
                                    <button class="btn btn-primary"  onclick="">编辑成绩</button>
                                </td>
                            </tr>
                        </tbody>

                    </table>
                    <div class="margin">
                        每一页显示<select id="pageSizeSelect" onchange="onSelectChange()">
                        <option value="2">2</option>
                        <option value="5">5</option>
                        <option value="10">10</option>
                    </select> 条数据，
                        当前是第<span id="currentPageSpan"></span> 页，
                        总共<span id="totalPageSpan"></span> 页
                        <button class="button" onclick="firstPage()">首页</button>
                        <button class="button" onclick="prePage()">上一页</button>
                        <button class="button" onclick="nextPage()">下一页</button>
                        <button class="button" onclick="lastPage()">尾页</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>
<script src="js/plugins/jeditable/jquery.jeditable.js"></script>
<!-- Data Tables -->
<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>
<!-- Page-Level Scripts -->
<script>
    $(document).ready(function () {
        $('.dataTables-example').dataTable();

        /* Init DataTables */
        var oTable = $('#editable').dataTable();

        /* Apply the jEditable handlers to the table */
        oTable.$('td').editable('../example_ajax.php', {
            "callback": function (sValue, y) {
                var aPos = oTable.fnGetPosition(this);
                oTable.fnUpdate(sValue, aPos[0], aPos[1]);
            },
            "submitdata": function (value, settings) {
                return {
                    "row_id": this.parentNode.getAttribute('id'),
                    "column": oTable.fnGetPosition(this)[2]
                };
            },

            "width": "90%",
            "height": "100%"
        });


    });

    function fnClickAddRow() {
        $('#editable').dataTable().fnAddData([
            "Custom row",
            "New row",
            "New row",
            "New row",
            "New row"]);

    }
</script>

<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<!--统计代码，可删除-->

</body>

</html>
